home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Examples / Draw / Sources / ToolFrame.cpp < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.1 KB  |  82 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                ToolFrame.cpp
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef TOOLFRAME_H
  14. #include "ToolFrame.h"
  15. #endif
  16.  
  17. #ifndef DRAWPART_H
  18. #include "DrawPart.h"
  19. #endif
  20.  
  21. #ifndef UTILITIES_H
  22. #include "Utilities.h"
  23. #endif
  24.  
  25. #ifndef TOOLDACET_H
  26. #include "ToolFacet.h"
  27. #endif
  28.  
  29. // ----- Framework Includes -----
  30. #ifndef FWWINDOW_H
  31. #include "FWWindow.h"
  32. #endif
  33.  
  34. // ----- Macintosh Includes -----
  35. #ifndef mathRoutinesIncludes
  36. #include <math routines.h>
  37. #endif
  38.  
  39. #pragma segment drawpart
  40.  
  41. //=========================================================================
  42. // CLASS CToolFrame
  43. //=========================================================================
  44.  
  45. //------------------------------------------------------------------------------
  46. // CToolFrame::CToolFrame
  47. //------------------------------------------------------------------------------
  48.  
  49. CToolFrame::CToolFrame()
  50. {
  51. }
  52.  
  53. //------------------------------------------------------------------------------
  54. // CToolFrame::InitToolFrame
  55. //------------------------------------------------------------------------------
  56.  
  57. void CToolFrame::InitToolFrame(XMPFrame* xmpFrame, CDrawPart *drawPart)
  58. {
  59.     InitFrame(xmpFrame, drawPart);
  60.     fDrawPart = drawPart;
  61.     this->SetCanBeActiveFrame(FALSE);
  62. }
  63.  
  64. //------------------------------------------------------------------------------
  65. // CToolFrame::~CToolFrame
  66. //------------------------------------------------------------------------------
  67.  
  68. CToolFrame::~CToolFrame()
  69. {
  70. }
  71.  
  72. //------------------------------------------------------------------------------
  73. // CToolFrame::NewFacet
  74. //------------------------------------------------------------------------------
  75.  
  76. FW_CFacet* CToolFrame::NewFacet(XMPFacet* xmpFacet)
  77. {
  78.     CToolFacet* facet = new CToolFacet;
  79.     facet->InitToolFacet(xmpFacet, fDrawPart);
  80.     return facet;
  81. }
  82.